package com.xingdata.jjxc.adapter;

import java.util.List;

import com.xingdata.jjxc.utils.Log;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

public class VideoPagerAdapter extends FragmentPagerAdapter {
	private String TAG="VideoPagerAdapter";
	private List<Fragment> fragments;

	public VideoPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
		super(fm);
		this.fragments = fragments;
	}

	@Override
	public int getCount() {
		return fragments.size();
	}

	public int getItemPosition(Object object) {
		return super.getItemPosition(object);
	};

	@Override
	public Fragment getItem(int arg0) {
		return fragments.get(arg0);
	}

	@Override
	public void destroyItem(ViewGroup container, int position, Object object) {
		// TODO Auto-generated method stub
		super.destroyItem(container, position, object);
		Log.i(TAG, "*********************正在销毁***************************");
	}
}
